package com.kucai.yifaqapp.ui.fragment;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.kucai.yifaqapp.R;

/**
 * Created by admin on 2018/12/20.
 */

public class RecommentFragmentone extends BaseFragmentSimple {
    private TextView username;
    private TextView userid;
    private TextView commsion;
    private TextView income;
    private TextView monthmember;
    private TextView link;
    private ImageView linkimg;

    @Override
    protected int setContentView() {
        return R.layout.fragment_recomment_01;
    }

    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        username = view.findViewById(R.id.username);
        userid = view.findViewById(R.id.userid);
        commsion = view.findViewById(R.id.commission);
        income = view.findViewById(R.id.income);
        monthmember = view.findViewById(R.id.monthmember);
        link = view.findViewById(R.id.link);
        linkimg = view.findViewById(R.id.linkimg);
        initData();
    }

    private void initData() {
//        HttpJsonUtils.getHttpApiInstance()
//                .get_My_tuijianMsg(Info.user.token)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//                .subscribe(new CustomObserver<HuiyuanTuijianBean>(this) {
//                    @Override
//                    protected void onSubscribeCustom(Disposable disposable) {
//
//                    }
//
//                    @Override
//                    protected void onErrorCustom(Throwable e) {
//
//                    }
//
//                    @Override
//                    protected void onCustomNext(HuiyuanTuijianBean resCode) {
//                        try {
//                            username.setText(resCode.getData().getUsername() + "");
//                            userid.setText(resCode.getData().getUserId() + "");
//                            commsion.setText(resCode.getData().getCommission() + "");
//                            income.setText(resCode.getData().getIncome() + "");
//                            monthmember.setText(resCode.getData().getMonthMemberCount() + "");
//                            link.setText(resCode.getData().getLink());
//                            Glide.with(getActivity()).load(resCode.getData().getLink()).asBitmap().into(linkimg);
//                        } catch (Exception e) {
//
//                        }
//
//                    }
//                });
    }

    @Override
    protected void ChangeSkin() {

    }
}
